from django.contrib import admin

from .models import *


class TypeAdmin(admin.ModelAdmin):
    list_display = list_display_links = ['id', 'name']


admin.site.register(Type, TypeAdmin)


class AdditionalAdmin(admin.ModelAdmin):
    list_display = list_display_links = ['id', 'name', 'type', 'nature', 'fraction', 'scholarship_id']


admin.site.register(Additional, AdditionalAdmin)


class RankAdmin(admin.ModelAdmin):
    list_display = list_display_links = ['name', 'fraction', 'additional_id']


admin.site.register(Rank, RankAdmin)


class ScholarshipAdmin(admin.ModelAdmin):
    list_display = list_display_links = ['id', 'name']

admin.site.register(Scholarship, ScholarshipAdmin)


class GradeAdmin(admin.ModelAdmin):
    list_display = list_display_links = ['id', 'course_name', 'credit', 'grade', 'user_id']
admin.site.register(Grade, GradeAdmin)


class SubmitRecordsAdmin(admin.ModelAdmin):
    list_display = list_display_links = ['id', 'semester', 'user_id']
admin.site.register(SubmitRecords, SubmitRecordsAdmin)